package com.laery0.xixin.service.impl;

import com.laery0.xixin.mapper.CiReportMapper;
import com.laery0.xixin.po.CiReport;
import com.laery0.xixin.po.ResponseBean;
import com.laery0.xixin.service.CiReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CiReportServiceImpl implements CiReportService {
    @Autowired
    private CiReportMapper ciReportMapper;

    @Override
    public ResponseBean<List<CiReport>> listCiReport(Integer orderId) {
        List<CiReport> ciReportList = ciReportMapper.listCiReport(orderId);
        if(ciReportList!=null && ciReportList.size()>0){
            return new ResponseBean<>(ciReportList);
        } else {
            return new ResponseBean<>(601, "没有Id为:" + orderId + "的体检详情");
        }
    }
}
